for i in range(100, 999):
    a = i//100
    b = (i//10)-10*a
    c = i-100*a-10*b
    if i == a**3 + b**3 + c**3:
        print(i, end = " ")